TOC  This Package  Prev  Next  Index  

§1.62 Interface Cloneable

public interface java.lang.Cloneable
{
}
A class implements the Cloneable interface in order to indicate to the clone method (§1.12.2) in class Object that it is legal for that method to make a field-for-field copy of instances of that class.

Attempts to clone instances that do not implement the Cloneable interface result in the exception CloneNotSupportedException (§1.27) being thrown.


TOC  This Package  Prev  Next  Index
Java API Document
Last edited by dkramer on April 11, 1996
Copyright © 1996 Sun Microsystems, Inc. Send any comments or corrections to dkramer@sun.com